import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/Login.vue'
import Home from '../views/Home.vue'
import Regist from '../views/Regist.vue'
import ForgetPwd from '../views/ForgetPwd.vue'
import Chat from '../views/Chat.vue'
import BlogComment from '../views/BlogComment.vue'
import Type from '../views/Type.vue'
import Tag from '../views/Tag.vue'
import WriteBlog from '../views/WriteBlog.vue'
import User from '../views/User.vue'

Vue.use(VueRouter)

const routes = [
  { path: '/', redirect: '/home' },
  {
    path: '/login',
    name: 'Login',
    component: Login
  },
  {
    path: '/forgetpwd',
    name: 'ForgetPwd',
    component: ForgetPwd
  },
  {
    path: '/regist',
    name: 'Regist',
    component: Regist
  },
  {
    path: '/home',
    name: 'Home',
    component: Home
  },
  {
    path: '/chat',
    name: 'Chat',
    component: Chat
  },
  {
    path: '/blogComment',
    name: 'BlogComment',
    component: BlogComment
  },
  {
    path: '/type',
    name: 'Type',
    component: Type
  },
  {
    path: '/tag',
    name: 'Tag',
    component: Tag
  },
  {
    path: '/blog',
    name: 'WriteBlog',
    component: WriteBlog
  },
  {
    path: '/userDetail',
    name: 'User',
    component: User
  },
]

const router = new VueRouter({
  routes
})

export default router
